const jsonServer = require('json-server')
const server = jsonServer.create()
const router = jsonServer.router('db.json')
const middlewares = jsonServer.defaults({
  static:'./public'
})

server.use(middlewares)
server.use(router)
server.listen(9999, () => {
  console.log('接口服务器开启成功，请访问http://127.0.0.1:9999')
})